Modifying/adding/deleting a style

Modifying a style with the given name:

var

Style: TfrxStyleItem;

Styles: TfrxStyles;

Styles := frxReport1.Styles;

{ search for a style}

Style := Styles.Find('Style1');

{ modify the font size }

Style.Font.Size := 12;

Adding a style to the report styles set:

var

Style: TfrxStyleItem;

Styles: TfrxStyles;

Styles := frxReport1.Styles;

{ add }

Style := Styles.Add;

Style.Name := 'Style3';

Deleting a style with a given name:

var

Style: TfrxStyleItem;

Styles: TfrxStyles;

Styles := frxReport1.Styles;

{ delete }

Style := Styles.Find('Style3');

Style.Free;

After modifications are accomplished, you should call the “Apply” method:

{ use modifications }

frxReport1.Styles.Apply;